<?php use_helper("Date") ?>
<?php slot("ms","publications.ls")?>
<h1 class="title"><?php echo __("Lista de Publicaciones")?></h1>

<table class="tbl-1">
  <thead>
    <tr>
      <th>Id</th>
      <th><?php echo __("Curso") ?></th>
      <th><?php echo __("Fecha de Inicio") ?></th>
      <th><?php echo __("Fecha de Finalizacion") ?></th>
      <th><?php echo __("Última Modificación") ?></th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($publications as $publication): ?>
    <tr>
      <td><a href="<?php echo url_for('publications/show?id='.$publication->getId()) ?>"><?php echo $publication->getId() ?></a></td>
      <td><?php echo $publication->getCourse() ?></td>
      <td><?php echo format_date($publication->getStartDate(),"D") ?></td>
      <td><?php echo format_date($publication->getEndDate(),"D") ?></td>
      <td><?php echo format_date($publication->getUpdatedAt(),"D") ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('publications/new') ?>">New</a>
